package com.lishui.waterfriend.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.lishui.waterfriend.common.result.PageResult;
import com.lishui.waterfriend.pojo.dto.TeamJoinDTO;
import com.lishui.waterfriend.pojo.dto.TeamQueryDTO;
import com.lishui.waterfriend.pojo.dto.TeamUpdateDTO;
import com.lishui.waterfriend.pojo.entity.Team;
import com.baomidou.mybatisplus.extension.service.IService;
import com.lishui.waterfriend.pojo.entity.UserTeam;

/**
* @author 24197
* @description 针对表【team(队伍)】的数据库操作Service
* @createDate 2024-04-03 01:32:44
*/
public interface TeamService extends IService<Team> {

    Long saveTeam(Team team);

    PageResult pageQuery(TeamQueryDTO teamQueryDTO);

    void updateTeam(TeamUpdateDTO teamUpdateDTO);

    void join(TeamJoinDTO teamJoinDTO);

    void quit(Long teamId);

    void disband(Long teamId);

    Team checkTeamId(Long teamId);

    QueryWrapper<UserTeam> getTeamWrapper(Long userId);

    QueryWrapper<UserTeam> getUserWrapper(Long teamId);

    QueryWrapper<UserTeam> getSelfWrapper(Long userId, Long teamId);
}
